package com.googlecode.androidspamblocker;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.provider.BaseColumns;

public class SmsDatabase extends SQLiteOpenHelper implements BaseColumns {

	public SmsDatabase(Context context) {
		super(context, "SB_DB", null, 1);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL("CREATE TABLE ContactBlackList(_id INTEGER INTEGER PRIMARY KEY autoincrement, Name TEXT, PhoneNo TEXT, Version TEXT)");
		db.execSQL("CREATE TABLE PublicSmsFilter(_id INTEGER INTEGER PRIMARY KEY autoincrement, Rule TEXT, PhoneNo TEXT, Name TEXT, Version TEXT)");
		db.execSQL("CREATE TABLE PrivateSmsFilter(_id INTEGER INTEGER PRIMARY KEY autoincrement, Rule TEXT, PhoneNo TEXT, Name TEXT, Version TEXT)");
	}

	@Override
	public void onUpgrade(SQLiteDatabase arg0, int arg1, int arg2) {
		//nothing
	}

}
